package com.yangyu.util;

import org.springframework.util.StringUtils;

/**
 * @author 一碗鱼汤面
 * @version V1.0
 * @Package com.yangyu.util
 * @date 2021/1/16 17:35
 */
public class StringUtil {

    public static int[] toCodePoints(String ip) {
        if (StringUtils.isEmpty(ip)) {
            return null;
        }
        String[] split = ip.split(".");
        int[] ints = new int[split.length];
        for (int i = 0; i < split.length; i++) {
            ints[i] = Integer.valueOf(split[i]);
        }
        return ints;
    }
}
